package com.bt.dmdb.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.bt.dmdb.dao.ProjectDao;
import com.bt.dmdb.model.Project;
import com.bt.dmdb.service.ProjectService;

@Service("projectService")
@Transactional(value = "txmDmdb")
public class ProjectServiceImpl implements ProjectService {

    @Autowired
    private ProjectDao projectDao;

    @Transactional(value = "txmDmdb", readOnly = true)
    public Project getProject(long id) {
        return projectDao.getProject(id);
    }

    @Transactional(value = "txmDmdb", readOnly = false)
    public long create(Project project){
       return projectDao.create(project);
    }

    public ProjectDao getProjectDao() {
        return projectDao;
    }

    public void setProjectDao(ProjectDao projectDao) {
        this.projectDao = projectDao;
    }
}
